Conditions | 1 |
Total Lines | 13 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import React, { Component, Fragment } from "react" |
||
22 | |||
23 | updateData() { |
||
24 | const { season, region, division, regnumber } = this.props |
||
25 | |||
26 | fetch( |
||
27 | `${this.apiServerUrl}/meta/${season}/${region}/${division}/${regnumber}` |
||
28 | ) |
||
29 | .then((response) => response.json()) |
||
30 | .then((json) => this.setState({ data: json, loading: false })) |
||
31 | |||
32 | this.timeout = setTimeout(() => { |
||
33 | this.updateData(() => {}) |
||
34 | }, this.apiRefreshRate) |
||
35 | } |
||
94 |